Used to get and set Mac OS X and Linux environment variables. Name is case-sensitive.
Syntax |
|---|
|
result = System.EnvironmentVariable( Name ) |
Parameters |
|
|---|---|
|
Name |
|
Return Value |
|
|---|---|
|
Result |
|
Notes
Returns a String.
For example, System.EnvironmentVariable("HOME") gets the value of the HOME environment variable, the path to the user's home directory.
System.EnvironmentVariable("HOME")="/Users/Joe"
sets the path to the Home directory.
To get the list of environment variables and their values (Mac OS X and Linux), execute the "env" command from a terminal window or via the Shell class. On Windows, use the "set" command instead of "env". See the Examples section.